<div class="problemindexholder" problemindex="C">
 <div class="ttypography">
  <div class="problem-statement">
   <div class="header">
    <div class="title">
     C. The Intriguing Obsession
    </div>
    <div class="time-limit">
     <div class="property-title">
      time limit per test
     </div>
     1 second
    </div>
    <div class="memory-limit">
     <div class="property-title">
      memory limit per test
     </div>
     256 megabytes
    </div>
    <div class="input-file">
     <div class="property-title">
      input
     </div>
     standard input
    </div>
    <div class="output-file">
     <div class="property-title">
      output
     </div>
     standard output
    </div>
   </div>
   <div>
    <p>
     <span class="tex-font-style-it">
      — This is not playing but duty as allies of justice, Nii-chan!
     </span>
    </p>
    <p>
     <span class="tex-font-style-it">
      — Not allies but justice itself, Onii-chan!
     </span>
    </p>
    <p>
     With hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters — Karen and Tsukihi — is heading for somewhere they've never reached — water-surrounded islands!
    </p>
    <p>
     There are three clusters of islands, conveniently coloured red, blue and purple. The clusters consist of
     <span class="tex-span">
      <i>
       a
      </i>
     </span>
     ,
     <span class="tex-span">
      <i>
       b
      </i>
     </span>
     and
     <span class="tex-span">
      <i>
       c
      </i>
     </span>
     distinct islands respectively.
    </p>
    <p>
     Bridges have been built between some (possibly all or none) of the islands. A bridge bidirectionally connects two different islands and has length
     <span class="tex-span">
      1
     </span>
     . For any two islands of the same colour, either they shouldn't be reached from each other through bridges, or the shortest distance between them is
     <span class="tex-font-style-bf">
      at least
      <span class="tex-span">
       3
      </span>
     </span>
     , apparently in order to prevent oddities from spreading quickly inside a cluster.
    </p>
    <p>
     The Fire Sisters are ready for the unknown, but they'd also like to test your courage. And you're here to figure out the number of different ways to build all bridges under the constraints, and give the answer modulo
     <span class="tex-span">
      998 244 353
     </span>
     . Two ways are considered different if a pair of islands exist, such that there's a bridge between them in one of them, but not in the other.
    </p>
   </div>
   <div class="input-specification">
    <div class="section-title">
     Input
    </div>
    <p>
     The first and only line of input contains three space-separated integers
     <span class="tex-span">
      <i>
       a
      </i>
     </span>
     ,
     <span class="tex-span">
      <i>
       b
      </i>
     </span>
     and
     <span class="tex-span">
      <i>
       c
      </i>
     </span>
     (
     <span class="tex-span">
      1 ≤
      <i>
       a
      </i>
      ,
      <i>
       b
      </i>
      ,
      <i>
       c
      </i>
      ≤ 5 000
     </span>
     ) — the number of islands in the red, blue and purple clusters, respectively.
    </p>
   </div>
   <div class="output-specification">
    <div class="section-title">
     Output
    </div>
    <p>
     Output one line containing an integer — the number of different ways to build bridges, modulo
     <span class="tex-span">
      998 244 353
     </span>
     .
    </p>
   </div>
   <div class="sample-tests">
    <div class="section-title">
     Examples
    </div>
    <div class="sample-test">
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>1 1 1<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>8<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>1 2 2<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>63<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>1 3 5<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>3264<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>6 2 9<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>813023575<br/></pre>
     </div>
    </div>
   </div>
   <div class="note">
    <div class="section-title">
     Note
    </div>
    <p>
     In the first example, there are
     <span class="tex-span">
      3
     </span>
     bridges that can possibly be built, and no setup of bridges violates the restrictions. Thus the answer is
     <span class="tex-span">
      2
      <sup class="upper-index">
       3
      </sup>
      = 8
     </span>
     .
    </p>
    <p>
     In the second example, the upper two structures in the figure below are instances of valid ones, while the lower two are invalid due to the blue and purple clusters, respectively.
    </p>
    <center>
     <img class="tex-graphics" src="/predownloaded/ce/99/ce99521933acb94fcf989ddf0b962c8c25978194.png" style="max-width: 100.0%;max-height: 100.0%;"/>
    </center>
   </div>
  </div>
  <p>
  </p>
 </div>
</div>
